package me.sauce.folkpocket48.home

import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.OnLifecycleEvent
import android.arch.lifecycle.ReportFragment
import android.databinding.DataBindingUtil
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import me.sauce.folkpocket48.R
import me.sauce.folkpocket48.databinding.FragmentHomeBinding



/**
 * @author sauceWu .
 * @since 2017/12/20 18:26
 */
class HomeFragment : ReportFragment() {


    private var db :FragmentHomeBinding? = null

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
        db = DataBindingUtil.inflate(inflater, R.layout.fragment_home, container, false)
        db!!.vm= HomeViewModule("1")
        return db!!.root
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    fun initData(){
        db!!.vm= HomeViewModule("12131")

    }

}